<?php 
$this->Html->css('calendar/bic_calendar', null, array('block' => 'css'));
$this->Html->script('calendar/bic_calendar', array('block' => 'script'));

$this->Html->css('bootstrap_calendar/calendar', null, array('block' => 'css'));
$this->Html->script('lib/underscore-min', array('block' => 'script'));
$this->Html->script('bootstrap_calendar/calendar', array('block' => 'script', 'text' => '1'));
?>

<?php // Construct breadcrumb
$this->Html->addCrumb('Home', '/');
$this->Html->addCrumb('Eventos', array('action' => 'index'));
$this->Html->addCrumb('Detalhe de evento');

echo $this->Html->breadcrumbs(array('divider' => '>'));
?>

<h2>
	<?php echo $evento['Evento']['nome'] ?>
	<?php if($evento['Evento']['site'] != null): ?>
	<small> <?php echo $this->Html->externalLink('',$evento['Evento']['site']); ?>
	</small>
	<?php endif; ?>
</h2>
<p>
	<?php echo $evento['Evento']['descricao'] ?>
</p>
<h3>Local</h3>
<p>
	<?php echo $evento['Local']['nome'] ?>
</p>
<h3>Ingressos</h3>
<table>
	<th>
		<td>Nome</td>
		<td>Quantidade Disponível</td>
		<td>Preço</td>
	</th>
	
	<?php foreach ($evento['Ingresso'] as $ingresso): ?>
	<tr>
		<td>
			<?php echo $ingresso['nome'].' - '.$ingresso['quantidade_disponivel']; ?>
			<?php endforeach; ?>
		</td>
	</tr>
</table>

<div id="calendar"></div>

<?php
echo $this->Html->eventsCalendar('calendar', array(
	'eventId' => $evento['Evento']['id']
));
?>
